import { createApp } from 'vue'
import App from './App.vue'
import {
  message, BackTop
} from 'ant-design-vue'
import router from './router'
import store from './store'
// 引入vue3 markdown editor
// 预览组件 不使用编辑功能
import VMdPreview from '@kangc/v-md-editor/lib/preview'
import '@kangc/v-md-editor/lib/style/preview.css'
// vuepress主题
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'
// 代码形式
import Prism from 'prismjs'
import 'prismjs/components/prism-json'
// 带上行号
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index'
// 带上复制代码功能
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index'
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css'

VMdPreview.use(vuepressTheme, {
  Prism,
})
VMdPreview.use(createLineNumbertPlugin())
VMdPreview.use(createCopyCodePlugin())

const app = createApp(App)

app.use(message)
app.use(router)
app.use(store)
app.use(VMdPreview)
app.use(BackTop)

app.mount('#app')
